#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Last Update:

'''test translate
'''

__revision__ = '0.1'
__author__ = 'lxd'
import translate

def test_getTranslate():
    f = translate.getTranslate('hello')
    assert f.code == 200
    assert f.read() != ''

def test_parse():
    f = open(r'test/translateContent.txt', 'r')
    data = f.read()
    f.close()
    t_word = u'n. 表示问候， 惊奇或唤起注意时的用语; int. 喂；哈罗; '
    translate.parse(data) == t_word

